<!DOCTYPE html>
<html ng-app="app">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" href="css/base.css" />
		<link rel="stylesheet" href="scss/cang.css" />
		<link rel="stylesheet" href="font-awesome/css/font-awesome.css" />
		<script src="js/angular.min.js"></script>
		<script src="js/angular-ui-router.min.js"></script>
		<script src="js/zepto.min.js"></script>
	</head>
	<body ng-controller="ctrl">
		<ui-view></ui-view>
		<ul class="footer">
			<li class="active"><a ui-sref="shou"><i class="fa fa-home"></i><p>首页</p></a></li>
			<li><a ui-sref="fen"><i class="fa fa-th-large"></i><p>分类</p></a></li>
			<li><a ui-sref="user"><i class="fa fa-user"></i><p>我</p></a></li>
		</ul>
		<script>
			(function(win,doc){
			    win.onresize = function(){
			        change();
			    };
			    change();
			    function change(){
			        var oFs = doc.documentElement.clientWidth/640*20;
			        doc.documentElement.style.fontSize = oFs + 'px';
			    }
			})(window,document);
			var app = angular.module("app", ["ui.router"]);
	        app.config(function($stateProvider, $urlRouterProvider){
	                $stateProvider.state("shou", {
				        url: "/shou",
				        templateUrl: "view/shou.html",
				        controller:"ctrl"
				    }).state("shou.yi", {
				        url: "/shou.yi",
				        templateUrl: "view/shou_a.html",
				        controller:"ctrl"
				    }).state("shou.er", {
				        url: "/shou.er",
				        templateUrl: "view/shou_b.html",
				        controller:"ctrl"
				    })
//				    .state("shou.yii", {
//				        url: "/shou.yii",
//				        templateUrl: "view/shou_ba.html",
//				        controller:"ctrl"
//				    }).state("shou.err", {
//				        url: "/shou.err",
//				        templateUrl: "view/shou_bb.html",
//				        controller:"ctrl"
//				    })
				    .state("shouCang", {
				        url: "/shouCang",
				        templateUrl: "view/shou_b1.html",
				        controller:"ctrl"
				    }).state("fen", {
				            url: "/fen",
				            templateUrl: "view/fen.html"
				    }).state("user", {
				            url: "/user",
				            templateUrl: "view/user.html",
				            controller:"ctrl"
				    }).state("user.yi",{
				    	url:"/user.yi",
				    	templateUrl:"view/user_a.html",
				    	controller:"ctrl"
				    }).state("user.er",{
				    	url:"/user.er",
				    	templateUrl:"view/user_b.html",
				    	controller:"ctrl"
				    }).state("she",{
				    	url:"/she",
				    	templateUrl:"view/she.html",
				    	controller:"ctrl"
				    })
				    $urlRouterProvider.otherwise("shou/shou.yi")
	        });
	        app.controller("ctrl",function(){
	        	$(".footer a").click(function(){
						$(this).parent().addClass("active").siblings().removeClass("active")
			    })
	        	$(".shou-header a").click(function(){
						$(this).parent().addClass("act").siblings().removeClass("act")
			    })
	        	$(".user-tiao a").click(function(){
						$(this).parent().addClass("acti").siblings().removeClass("acti")
			    })
	        	$(".bu").tap(function(){
					$(".she-fu").css("display","block")
					$(".she-fu .mo-tai").animate({"bottom":"4rem"},{"duration":"500"})
					
				})
				$(".she-fu").tap(function(){
					$(".she-fu .mo-tai").animate({"bottom":"-20rem"},{"duration":"500"})
					$(this).css("display","none")
					
				})
	        })
			
	    </script>
	</body>
	
</html>
